import { Action } from 'redux'
import { ShipAddressITF } from '@INTERFACES/Address'

export interface AddressActionITF extends Action {
  isInit: boolean;
  isSetDefaultAddress?: boolean
}

export interface UpdateAddressITF extends CreateAddressITF {
  AddressId: string
}

export interface CreateAddressITF {
  PhoneNumber: string,
  Addressee: string,
  Province: string,
  City: string,
  Area: string,
  Address: string
}

export interface AddressUpdateActionITF extends Action {
  address: UpdateAddressITF
}

export interface AddressCreateActionITF extends Action {
  address: CreateAddressITF;
  isSelected: boolean;
}

export interface AddressDeleteActionITF extends Action {
  p8Id: string
}
export interface AddressSetActionITF extends Action {
  address: ShipAddressITF | null
}

export interface AddressStateITF {
  shipAddress: ShipAddressITF[];
  selectedAddress: ShipAddressITF | null;
  refreshing: boolean;
  loading: boolean;
  canLoadMore: boolean;
}
